<!DOCTYPE html>
<html lang="en">
    <head>
        <!-- Basic Page Needs
        –––––––––––––––––––––––––––––––––––––––––––––––––– -->
        <meta charset="utf-8">
        <title>Skeleton: Responsive CSS Boilerplate</title>
        <meta name="description" content="">
        <meta name="author" content="">

        <!-- Mobile Specific Metas
        –––––––––––––––––––––––––––––––––––––––––––––––––– -->
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <!-- CSS
        –––––––––––––––––––––––––––––––––––––––––––––––––– -->
        <link rel="stylesheet" href="css/normalize.css">
        <link rel="stylesheet" href="css/skeleton.css">
        <link rel="stylesheet" href="css/custom.css">

        <!-- Scripts
        –––––––––––––––––––––––––––––––––––––––––––––––––– -->
        <script src="js/jquery.min.js"></script>
        {{#unless session}}
        <script>
            function auth(method) {
                $("#form").attr("action", "/" + method);
                $("#form")[0].submit(function() {
                    $("#username").val("");
                    $("#password").val("");
                    $("#form").attr("action", "#");
                });
            }
        </script>
        {{/unless}}
    </head>
    <body>

      <!-- Primary Page Layout
      –––––––––––––––––––––––––––––––––––––––––––––––––– -->
        <div class="section hero">
            <div class="container">
                <div class="row">
                    <div class="one-half column">
                        {{#if message}}
                        <div id="flash" style="color: red;">{{message}}</div>
                        {{/if}}
                        <h4 class="hero-heading">Stop coding non-responsive sites. Let users view sites from anywhere.</h4>
                        {{#unless session}}
                        <div id="form-container">
                            <form id="form" action="#" name="form" method="POST">
                                <input type="text" name="username" id="username" placeholder="Username"></input>
                                <input type="password" name="password" id="password" placeholder="Password"></input>
                                <a class="button button-primary" href="javascript:auth('register');">Register</a>
                                <a class="button button-primary" href="javascript:auth('login');">Login</a>
                            </form>
                        </div>
                        {{/unless}}
                        {{#if session}}
                        <script>
                            function now() {
                                $.ajax({
                                    url: '/service/v1/date',
                                    cache: false,
                                    dataType: 'text',
                                    success: function(response) {
                                        alert(response);
                                    },
                                    error: function(err) {
                                        alert(err.responseText);
                                    }
                                });
                            }
                        </script>
                        <div id="content-container">
                            <a class="button button-primary" href="javascript:now();">Get current date</a>
                            <a class="button button-primary" href="/logout">Logout</a>
                        </div>
                        {{/if}}
                    </div>
                    <div class="one-half column phones">
                        <img class="phone" src="img/iphone.png">
                        <img class="phone" src="img/iphone.png">
                    </div>
                </div>
            </div>
        </div>

        <div class="section values">
            <div class="container">
                <div class="row">
                    <div class="one-third column value">
                        <h2 class="value-multiplier">67%</h2>
                        <h5 class="value-heading">Purchase Increase</h5>
                        <p class="value-description">Percentage of users more likely to purchase on mobile friendly site.</p>
                    </div>
                    <div class="one-third column value">
                        <h2 class="value-multiplier">90%</h2>
                        <h5 class="value-heading">Multi-device Users</h5>
                        <p class="value-description">Most of the world accesses the internet on multiple devices.</p>
                    </div>
                    <div class="one-third column value">
                        <h2 class="value-multiplier">66%</h2>
                        <h5 class="value-heading">Sad Users</h5>
                        <p class="value-description">Percentage of users that are frustrated with page load times.</p>
                    </div>
                </div>
            </div>
        </div>

        <div class="section get-help">
            <div class="container">
                <h3 class="section-heading">Need help getting started?</h3>
                <p class="section-description">Skeleton is an amazingly easy place to start with responsive development. If you want to learn more, just visit the documentation!</p>
                <a class="button button-primary" href="http://getskeleton.com">View Skeleton Docs</a>
            </div>
        </div>

        <div class="section categories">
            <div class="container">
                <h3 class="section-heading">Responsive Images</h3>
                <p class="section-description">Skeleton images sit easily in grid with .u-max-full-width class. I suggest exploring solution to serving different images based on device size.</p>
                <div class="row">
                    <div class="one-half column category">
                        <img class="u-max-full-width" src="img/placeholder.png">
                    </div>
                    <div class="one-half column category">
                        <img class="u-max-full-width" src="img/placeholder.png">
                    </div>
                </div>
            </div>
        </div>

    <!-- End Document
      –––––––––––––––––––––––––––––––––––––––––––––––––– -->
    </body>
</html>